package gof_001_创建型_Create.gof_002_工厂方法_FactoryMethod.gof_001_SimpleFactory;

public class SimpleFactoryMain {
    public static void main(String[] args) {
        CPUFactory cpuFactory = new CPUFactory();

        CPU i3 = cpuFactory.getCPUByType("i3");
        CPU i5 = cpuFactory.getCPUByType("i5");
        CPU i7 = cpuFactory.getCPUByType("i7");

        i3.calc();
        i5.calc();
        i7.calc();
    }
}
